import unittest

from docTestLearning import multiply
from mydict import Dict


class TestDict(unittest.TestCase):
    # def test_init(self):
    #     d = Dict(a=1, b='test')
    #     self.assertEquals(d.a, 1)
    #     self.assertEquals(d.b, 'test')
    #     self.assertTrue(isinstance(d, dict))

    # def test_key(self):
    #     d = Dict()
    #     d['key'] = 'value'
    #     self.assertEquals(d.key, 'value')
    #
    # def test_attr(self):
    #     d = Dict()
    #     d.key = 'value'
    #     self.assertTrue('key' in d)
    #     self.assertEquals(d['key'], 'value')

    # def test_keyerror(self):
    #     d = Dict()
    #     with self.assertRaises(KeyError):
    #         value = d['empty']

    # def test_attrerror(self):
    #     d = Dict()
    #     with self.assertRaises(AttributeError):
    #         value = d.empty

    def test_multiply(self):
        ret = multiply(2, 3)
        print "result is :", ret


if __name__ == '__main__':
    import doctest

    doctest.testmod(verbose=True)

    unittest.main()
